package com.igeekhome.ccs.mapper;

import com.igeekhome.ccs.entity.CommonWords;
import com.igeekhome.ccs.entity.CommonWordsCategory;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface CommonWordsCategoryMapper {
//👇zyh-------------------------------------
    //通过分类id拿到分类名字
    String getCategoryNameById(String categoryId);

    //拿到公共库所有分类对象 lib=="公共库“
    List<CommonWordsCategory> queryPublicLib();

    //拿到个人库所有分类对象 lib=="个人库“
    List<CommonWordsCategory> queryPrivateLib(int csId);

    //通过分类ID拿到所有的常用语对象
    List<CommonWords> queryCwByCategoryId(int categoryId);

    //新增分类
    void createCwc(CommonWordsCategory commonWordsCategory);

//👆zyh----------------------------------------
}
